<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>游戏社区管理平台</title>
    <script src="https://cdn.socket.io/4.5.0/socket.io.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/admin_dashboard.css') }}">
</head>
<body>
    <div class="container">
        <!-- 管理员页面 -->
        <div id="admin-page">
            <header>
                <div class="logo">
                    <i class="fas fa-crown"></i>
                    <span>游戏社区管理平台</span>
                </div>
                <div class="user-info">
                    <img src="https://randomuser.me/api/portraits/men/32.jpg" alt="管理员头像">
                    <div>
                        <div>管理员</div>
                        <small>admin@gamer.com</small>
                    </div>
                    <div class="user-actions">
                        <button class="btn btn-primary" id="logout-btn">
                            <i class="fas fa-sign-out-alt"></i> 退出
                        </button>
                    </div>
                </div>
            </header>

            <div class="tabs">
                <div class="tab active" data-tab="announcements">公告管理</div>
                <div class="tab" data-tab="surveys">问卷管理</div>
                <div class="tab" data-tab="users">用户管理</div>
                <div class="tab" data-tab="feedbacks">反馈管理</div>
                <div class="tab" data-tab="admin-requests">管理员申请</div>
                <div class="tab" data-tab="survey-responses">问卷回答管理</div>
            </div>

            <!-- 公告管理 -->
            <div class="tab-content active" id="announcements-tab">
                <div class="section-title">
                    <i class="fas fa-bullhorn"></i>
                    <span>公告管理</span>
                </div>

                <div class="card">
                    <div class="card-content">
                        <div class="form-group">
                            <label for="announcement-title">公告标题</label>
                            <input type="text" id="announcement-title" placeholder="请输入公告标题">
                        </div>
                        <div class="form-group">
                            <label for="announcement-content">公告内容</label>
                            <textarea id="announcement-content" placeholder="请输入公告内容..."></textarea>
                        </div>
                        <button class="btn btn-primary" id="publish-announcement">
                            <i class="fas fa-paper-plane"></i> 发布公告
                        </button>
                    </div>
                </div>

                <div class="section-title" style="margin-top: 30px;">
                    <i class="fas fa-list"></i>
                    <span>公告列表</span>
                </div>

                <div class="cards-grid" id="announcements-list">
                    <!-- 公告列表将通过JS动态生成 -->
                </div>
            </div>

            <!-- 问卷管理 -->
            <div class="tab-content" id="surveys-tab">
                <div class="section-title">
                    <i class="fas fa-poll"></i>
                    <span>问卷管理</span>
                </div>

                <div class="card">
                    <div class="card-content">
                        <div class="form-group">
                            <label for="survey-title">问卷标题</label>
                            <input type="text" id="survey-title" placeholder="请输入问卷标题">
                        </div>
                        <div class="form-group">
                            <label for="survey-content">问卷内容</label>
                            <textarea id="survey-content" placeholder="请输入问卷内容..."></textarea>
                        </div>
                        <button class="btn btn-primary" id="publish-survey">
                            <i class="fas fa-paper-plane"></i> 发布问卷
                        </button>
                    </div>
                </div>

                <div class="section-title" style="margin-top: 30px;">
                    <i class="fas fa-list"></i>
                    <span>问卷列表</span>
                </div>

                <div class="cards-grid" id="surveys-list">
                    <!-- 问卷列表将通过JS动态生成 -->
                </div>
            </div>
            <!-- 问卷回答管理 -->
            <div class="tab-content" id="survey-responses-tab">
                <div class="section-title">
                    <i class="fas fa-comment-dots"></i>
                    <span>问卷回答管理</span>
                    
                </div>

                <div class="cards-grid" id="survey-responses-list">
                    <!-- 问卷回答列表将通过JS动态生成 -->
                </div>
            </div>
            <!-- 用户管理 -->
            <div class="tab-content" id="users-tab">
                <div class="section-title">
                    <i class="fas fa-users"></i>
                    <span>用户管理</span>
                </div>

                <div class="cards-grid" id="users-list">
                    <!-- 用户列表将通过JS动态生成 -->
                </div>
            </div>

            <!-- 反馈管理 -->
            <div class="tab-content" id="feedbacks-tab">
                <div class="section-title">
                    <i class="fas fa-comment-dots"></i>
                    <span>反馈管理</span>
                </div>

                <div class="cards-grid" id="feedbacks-list">
                    <!-- 反馈列表将通过JS动态生成 -->
                </div>
            </div>

            <!-- 管理员申请 -->
            <div class="tab-content" id="admin-requests-tab">
                <div class="section-title">
                    <i class="fas fa-user-shield"></i>
                    <span>管理员申请</span>
                </div>

                <div class="cards-grid" id="admin-requests-list">
                    <!-- 申请列表将通过JS动态生成 -->
                </div>
            </div>
        </div>
    </div>

    <!-- 通知组件 -->
    <div class="notification" id="notification">
        <div class="notification-title">
            <i class="fas fa-bell"></i>
            <span id="notification-title">新通知</span>
        </div>
        <div class="notification-content" id="notification-content">通知内容</div>
    </div>

    <script src="{{ url_for('static', filename='js/admin_dashboard.js') }}"></script>
</body>
</html>